import { _decorator, Component, Node, Renderer, Sprite } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('getMaterial')
export class getMaterial extends Component {
    start() {
        const render = this.node.getComponent(Renderer);

        if (render) {
            console.log(this.node.name)
            console.log('default material', render.material)
            for (const m of render.materials) {
                console.log(m)
            }
        }

    }

    update(deltaTime: number) {

    }
}


